﻿using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Collections.Concurrent;
using DataTransFrame;
using System.Net;
using System.Net.Sockets;
using NetMQ;
using NetMQ.Sockets;


namespace DataTramsmittingServer
{
    class Program
    {
        static void Main(string[] args)
        {
            //数据转发服务器程序
            ThreadPool.QueueUserWorkItem(new WaitCallback(new DataTransServer().TransServerThread),null);

            //订阅消息（数据归集服务器程序）
            ThreadPool.QueueUserWorkItem(new WaitCallback(new SubClient().ShowText), "SME");

            //创建数据 （数据采集服务器程序）
            ThreadPool.QueueUserWorkItem(new WaitCallback(new CollectClient().CollectMsg), new IPEndPoint(IPAddress.Parse("127.0.0.1"), 38400));

            Console.ReadKey();
        }
      
    }
}
